package TransactionImplementation

import (
	"SalaryPayment/AbstractTransaction"
	"SalaryPayment/DataBase"
	"SalaryPayment/Model"
	"SalaryPayment/ModelImplementation"
)

type ChangeMemberTransaction struct {
	itsDues float64
	itsMemberId int
	AbstractTransactions.ChangeAffiliationTransaction
}

func(cmt *ChangeMemberTransaction) RecordMembership(e *Model.Employee) {
	DataBase.PayrollDatabase.Default.AddUnionMember(cmt.itsMemberId, e);
}

func(cmt *ChangeMemberTransaction) GetAffiliation() Model.Affiliation {
	return ModelImplementation.NewUnionAffiliation(cmt.itsMemberId, cmt.itsDues)
}